//
//  MyCell.m
//  CreativeLife
//
//  Created by qianfeng on 15-6-11.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import "MyCell.h"

@implementation MyCell

- (void)awakeFromNib {
    // Initialization code
}

-(void)showDataWithModel:(CreativeModel *)model{
//    if (!model.is_ad) {
        [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.publisher_icon_url] placeholderImage:[UIImage imageNamed: @"dropdown_anim__00037"]];
        self.nameLabel.text=model.publisher_name;
        self.contentLabel.text=model.text;
        CGRect frame=self.contentLabel.frame;
        CGFloat hight=[LZXHelper textHeightFromTextString:model.text width:310 fontSize:14];
        frame.size.height=hight;
        self.contentLabel.frame=frame;
        
        CGRect imageFrame= self.textImageView.frame;
        imageFrame.size.height=self.contentLabel.frame.origin.y+5;
        
        
        self.textImageView.frame=imageFrame;
        
        [self.textImageView sd_setImageWithURL:[NSURL URLWithString:model.middle] placeholderImage:[UIImage imageNamed: @"dropdown_anim__00037"]];
        self.goodLabel.text=[model.good_count stringValue];
        self.badLabel.text=[model.bad_count stringValue];
        self.commentLabel.text=[model.share_count stringValue];
//    }
    

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)goodbtnClick:(UIButton *)sender {
}
- (IBAction)badbtnClick:(UIButton *)sender {
}
- (IBAction)commentbtnClick:(UIButton *)sender {
}
@end
